# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=gweled
pkgver=0.9.1
pkgrel=4
pkgdesc="A puzzle game similar to Bejeweled (aka Diamond Mine)"
arch=('i686' 'x86_64')
license=('GPL')
url="https://launchpad.net/gweled/"
depends=('gtk2' 'librsvg' 'libmikmod' 'hicolor-icon-theme')
makedepends=('intltool')
install=gweled.install
source=(http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz)
sha1sums=('ff4a59935c9e1eb4a202e723baabaab39f526714')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --with-scores-user=root --with-scores-group=games
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

# We generate these files on post-install to prevent score resets on upgrade
  rm -rf "${pkgdir}/var"
}
